*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*
*Generated: 2025-11
*
*by Lukas Rudolph
*
*modified: --
*
*Data used: ukr_conjoint_replication_data.dta
*Data output generated: --
*
*Tables generated: Supplementary Tables 7-17
*Figutes generated: Figs. 2, 3, 4; Supplementary Figs. 4, 5, 7, 11, 12, 13, 14
*
*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*PREPARATION
*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

********************************************************
*prepare Stata 
********************************************************

version 19 

*path
cd "" // set working directory to folder where you upload the replication files
// create subfolders with name "figures" and with name "tables"

*output directories
global fig = "figures"
global tab = "tables"

*install necessary third-party packages if not already installed
*findit estout      // by Ben Jann
*findit coefplot    // by Ben Jann
*findit grstyle     // by Ben Jann   
*findit palettes     // by Ben Jann
*findit colrspace     // by Ben Jann

*define grstyle for nice layout
set scheme s2color   
grstyle init
grstyle set imesh
grstyle set symbol
grstyle set legend, nobox

*load data 
use ukr_conjoint_replication_data, clear

********************************************************
*RECODING
********************************************************

*** recoding of country variable for Figure 3 

gen country2 = ""
replace country2 = "DE" if Country == 1 
replace country2 = "IT" if Country == 2
replace country2 = "UK" if Country == 3 
replace country2 = "FR" if Country == 4 
replace country2 = "US" if Country == 5 


*** recoding of attributes for combined distributions as displayed in Suppl. Fig. 4 + labelling

** for metric interaction model 

gen q2_attr5_concept_task_v2 = q2_attr5_concept_task 
gen q2_attr6_concept_task_v2 = q2_attr6_concept_task
gen q2_attr8_concept_task_v2 = q2_attr8_concept_task
gen q2_attr9_concept_task_v2 = q2_attr9_concept_task

label variable q2_attr5_concept_task_v2 "Military aid in 0.1% intervals"
label variable q2_attr6_concept_task_v2 "Econ. aid in 0.1% intervals"
label variable q2_attr8_concept_task_v2 "Concess. (metric in levels)"
label variable q2_attr9_concept_task_v2 "Sov. (metric in levels)"

** for linear combination model 

gen econ = (q2_attr6_concept_task + q2_attr5_concept_task) - 1
tab econ

gen ukr_sov = (q2_attr8_concept_task + q2_attr9_concept_task) - 1
tab ukr_sov

label variable econ "Combination military/econ. aid costs ((level+1)*0.1%)"
label variable ukr_sov "Combination political costs (levels concess.+sov.-1)"

** alternative labels for tex ready tables 

label define attr4v2 1 "\textdollar50B" 2 "\textdollar100B" 3 "\textdollar200B", replace

label define attr5v2 1 "0.1\% of GDP" ///
           2 "0.2\% of GDP" ///
           3 "0.3\% of GDP", replace

label define attr6v2 1 "0.1\% of GDP" ///
           2 "0.2\% of GDP" ///
           3 "0.3\% of GDP", replace

label define attr7v2 1 "Not present (0\%)" 2 "Low (5\%)" 3 "Moderate (10\%)", replace

label define attr8v2 1 "None" ///
2 "Crimea (4\%)" ///
3 "2014 LoC (8\%)" ///
4 "2023 LoC (16\%)", replace
 
label define countryv2 1 "DE" 2 "IT" 3 "UK" 4 "FR" 5 "US", replace

** generate task indicator for tasks in order as presented to respondents for Suppl. Fig 13
gen task_no = .
replace task_no = UKR_ROUND2_task1 if task == 1
replace task_no = UKR_ROUND2_task2 if task == 2
replace task_no = UKR_ROUND2_task3 if task == 3
replace task_no = UKR_ROUND2_task4 if task == 4


*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
* MAIN ARTICLE FIGURES (in order of appearance with supplementary tables containing statistics for interpretation)
*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


***************************************************************************************************
*** FIGURE 1 : conceptual, no replication code
***************************************************************************************************



***************************************************************************************************
*** FIGURE 2 : Average Marginal Component Effects (AMCEs) for the binary paired profile conjoint-experimental choice task; full statistics reported in Supplementary Table 7
***************************************************************************************************

eststo clear

eststo: reg choice  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  [pweight=W8], cluster(id)

*testing coefficients of interest within dimensions against each other
test 3.q2_attr5_concept_task  = 3.q2_attr6_concept_task
test 3.q2_attr4_concept_task  = 3.q2_attr1_concept_task
test 3.q2_attr9_concept_task  = 4.q2_attr8_concept_task

** Figure 2
coefplot , baselevel drop(_cons) xline(0) ysize(16) xsize(20)   yline(21 32 38, lstyle(p20) lpattern(dash)) yscale(alt axis(2)) /// 
groups(?.q2_attr1_concept_task ?.q2_attr2_concept_task ?.q2_attr3_concept_task ?.q2_attr4_concept_task = `""{bf:Human suffering /}" "{bf:destruction}""' ///
		 ?.q2_attr5_concept_task ?.q2_attr6_concept_task = `""{bf:Support}" "{bf:costs}""' ///
		 ?.q2_attr7_concept_task =  `""{bf:Strategic}" "{bf:risk}""' /// 
		 		 ?.q2_attr8_concept_task ?.q2_attr9_concept_task =  `""{bf:Political}" "{bf:costs}""' /// 
		 , labsize(vsmall)  angle(rvertical)) /// 
		  headings( ///
            1.q2_attr1_concept_task = "{it:Ukrainian military casualties}" /// 
			1.q2_attr2_concept_task = "{it:Russian military casualties}" /// /// 
			1.q2_attr3_concept_task = "{it:Ukrainian civilian casualties}" /// /// 
			1.q2_attr4_concept_task = "{it:Ukrainian infrastructure loss}" /// /// 
			1.q2_attr5_concept_task = "{it:[Country] military aid}" /// /// 
			1.q2_attr6_concept_task = "{it:[Country] economic aid}" /// 
			1.q2_attr7_concept_task = "{it:Nuclear strike risk}"                /// 
			1.q2_attr8_concept_task = "{it:Concessions}"                /// 
			1.q2_attr9_concept_task = "{it:Sovereignty}"                /// 
			) /// 
			coeflabels(,labsize(vsmall) ) ///
	 msize(small) xlab(, labs(vsmall))
  
 graph export "$fig\Fig2.eps", replace
 
 ** corresponding Supplementary Information Table 7 
 
label values q2_attr4_concept_task attr4v2 
label values q2_attr5_concept_task attr5v2
label values q2_attr6_concept_task attr6v2
label values q2_attr7_concept_task attr7v2
label values q2_attr8_concept_task attr8v2

esttab    using "$tab\atfig2.tex" /// 
, nobaselevel replace label cells(b(fmt(3)) p(fmt(3) par) ci(fmt(3) par))	ar2   refcat( ///
            2.q2_attr1_concept_task   "\textit{Ukrainian military casualties}" /// 
			2.q2_attr2_concept_task  "\textit{Russian military casualties}" /// /// 
			2.q2_attr3_concept_task  "\textit{Ukrainian civilian casualties}" /// /// 
			2.q2_attr4_concept_task  "\textit{Ukrainian infrastructure loss}" /// /// 
			2.q2_attr5_concept_task  "\textit{[Country] military aid}" /// /// 
			2.q2_attr6_concept_task  "\textit{[Country] economic aid}" /// 
			2.q2_attr7_concept_task  "\textit{Nuclear strike risk}"                /// 
			2.q2_attr8_concept_task  "\textit{Concessions}"                /// 
			2.q2_attr9_concept_task  "\textit{Sovereignty}"                /// 
			, nolabel )  

label values q2_attr4_concept_task attr4 
label values q2_attr5_concept_task attr5
label values q2_attr6_concept_task attr6
label values q2_attr7_concept_task attr7
label values q2_attr8_concept_task attr8

***************************************************************************************************
*** FIGURE 3: country heterogeneity 
* with corresponding statistics in Supplementary Information Tables 8, 9, 10
***************************************************************************************************

eststo clear

foreach x in DE FR IT UK US {
reg choice  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  if country2 == "`x'"  [pweight=W8], cluster(id)

eststo `x': margins  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  , post
}


coefplot DE FR IT  US UK, baselevel drop(_cons) xline(0) ysize(16) xsize(20)   yline(21 32 38, lstyle(p20) lpattern(dash)) yscale(alt axis(2)) /// 
groups(?.q2_attr1_concept_task ?.q2_attr2_concept_task ?.q2_attr3_concept_task ?.q2_attr4_concept_task = `""{bf:Human suffering /}" "{bf:destruction}""' ///
		 ?.q2_attr5_concept_task ?.q2_attr6_concept_task = `""{bf:Support}" "{bf:costs}""' ///
		 ?.q2_attr7_concept_task =  `""{bf:Strategic}" "{bf:risk}""' /// 
		 		 ?.q2_attr8_concept_task ?.q2_attr9_concept_task =  `""{bf:Political}" "{bf:costs}""' /// 
		 , labsize(vsmall)  angle(rvertical)) /// 
		  headings( ///
            1.q2_attr1_concept_task = "{it:Ukrainian military casualties}" /// 
			1.q2_attr2_concept_task = "{it:Russian military casualties}" /// /// 
			1.q2_attr3_concept_task = "{it:Ukrainian civilian casualties}" /// /// 
			1.q2_attr4_concept_task = "{it:Ukrainian infrastructure loss}" /// /// 
			1.q2_attr5_concept_task = "{it:[Country] military aid}" /// /// 
			1.q2_attr6_concept_task = "{it:[Country] economic aid}" /// 
			1.q2_attr7_concept_task = "{it:Nuclear strike risk}"                /// 
			1.q2_attr8_concept_task = "{it:Concessions}"                /// 
			1.q2_attr9_concept_task = "{it:Sovereignty}"                /// 
			) /// 
			coeflabels(,labsize(vsmall)) ///
	 msize(small) xlab(, labs(vsmall)) ///
	 legend(row(1) symysize(vsmall) size(vsmall)) name(one, replace)
	 
	 graph combine one, ysize(16) xsize(10)

 graph export "$fig\Fig3.eps", replace  
 
 ** corresponding Supplementary Information Table 8 
 
label values country countryv2

label values q2_attr4_concept_task attr4v2 
label values q2_attr5_concept_task attr5v2
label values q2_attr6_concept_task attr6v2
label values q2_attr7_concept_task attr7v2
label values q2_attr8_concept_task attr8v2

esttab DE IT UK FR US    using "$tab\atfig3.tex" /// 
,  replace label cells(b(fmt(3)) p(fmt(3) par) ci(fmt(3) par))	stats(N) mtitles(DE IT UK FR US) refcat( ///
            1.q2_attr1_concept_task   "\textit{Ukrainian military casualties}" /// 
					1.q2_attr2_concept_task  "\textit{Russian military casualties}" /// /// 
			1.q2_attr3_concept_task  "\textit{Ukrainian civilian casualties}" /// /// 
			1.q2_attr4_concept_task  "\textit{Ukrainian infrastructure loss}" /// /// 
			1.q2_attr5_concept_task  "\textit{[Country] military aid}" /// /// 
			1.q2_attr6_concept_task  "\textit{[Country] economic aid}" /// 
			1.q2_attr7_concept_task  "\textit{Nuclear strike risk}"                /// 
			1.q2_attr8_concept_task  "\textit{Concessions}"                /// 
			1.q2_attr9_concept_task  "\textit{Sovereignty}"                /// 
			, nolab)  
			
** corresponding Supplementary Information Table 9 with Bonferroni-adjusted comparison

reg choice (ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task)##i.country   [pweight=W8], cluster(id)

eststo bonf: margins  (ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task)#i.country  ,  mcompare(bonferroni) post

matrix conf = r(table)

mat conf = r(table)
mat ul = conf[6,1...]
estadd matrix ul = ul : bonf
mat ll = conf[5,1...]
estadd matrix ll = ll : bonf

esttab bonf    using "$tab\atfig3bonf.tex" /// 
,  replace label   /// cells(b(fmt(3)) se(fmt(3) par) ci(fmt(3) par))	
cells("b(fmt(%12.4f)) ll(fmt(%12.4f)) ul(fmt(%12.4f)) p(fmt(%12.4f))") ///
stats(N)  nomtitles   refcat( ///
            1.q2_attr1_concept_task#1.country   "\textit{Ukrainian military casualties}" /// 
					1.q2_attr2_concept_task#1.country  "\textit{Russian military casualties}" /// /// 
			1.q2_attr3_concept_task#1.country  "\textit{Ukrainian civilian casualties}" /// /// 
			1.q2_attr4_concept_task#1.country  "\textit{Ukrainian infrastructure loss}" /// /// 
			1.q2_attr5_concept_task#1.country  "\textit{[Country] military aid}" /// /// 
			1.q2_attr6_concept_task#1.country  "\textit{[Country] economic aid}" /// 
			1.q2_attr7_concept_task#1.country  "\textit{Nuclear strike risk}"                /// 
			1.q2_attr8_concept_task#1.country  "\textit{Concessions}"                /// 
			1.q2_attr9_concept_task#1.country  "\textit{Sovereignty}"                /// 
			, nolab)  

label values q2_attr4_concept_task attr4 
label values q2_attr5_concept_task attr5
label values q2_attr6_concept_task attr6
label values q2_attr7_concept_task attr7
label values q2_attr8_concept_task attr8	

** corresponding Supplementary Information Table 10 with comparison of group differences from country marginal means with bonferroni adjustment for paper interpretation
reg choice (ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task)##i.country   [pweight=W8], cluster(id)

collect: margins  (ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task)#i.country  , pwcompare(group) mcompare(bonferroni)
 
* associate each groups# result with its predictive margin
local stripe : colname r(table)
local k : list sizeof stripe
forval i = 1/`k' {
    gettoken name stripe : stripe
    collect addtag colname[`name'], fortags(result[groups`i']) replace
    local glist `glist' groups`i'
}
* put all the groups# results in a composite result so we can
* arrange them in a single column
collect composite define groups = `glist'

* label the groups
collect label levels result groups "Bonferroni groups", modify

* turn off the factor variable binder
collect style row stack, nobinder

* arrange the results of interest
collect layout (colname) (result[_r_b _r_se groups])

* export to LaTeX
collect export $tab\atfig3bonfgroup.tex, replace tableonly


***************************************************************************************************
*** Figure 4: Heterogeneity by pro/anti-Western attitudes
* with corresponding statistics in Supplementary Information Tables 11, 12, 13
***************************************************************************************************

***** 
eststo clear

reg choice  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  if antiwestern == 1   [pweight=W8], cluster(id)

eststo strong_anti_west: margins  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  , post

reg choice  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  if prowestern == 1 [pweight=W8] , cluster(id)

eststo strong_pro_west: margins  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  , post 


coefplot strong_pro_west strong_anti_west, baselevel drop(_cons) xline(0) ysize(16) xsize(20) xlabel(.4(.05).6) /// 
groups(?.q2_attr1_concept_task ?.q2_attr2_concept_task ?.q2_attr3_concept_task ?.q2_attr4_concept_task = `""{bf:Human suffering /}" "{bf:destruction}""' ///
		 ?.q2_attr5_concept_task ?.q2_attr6_concept_task = `""{bf:Support}" "{bf:costs}""' ///
		 ?.q2_attr7_concept_task =  `""{bf:Strategic}" "{bf:risk}""' /// 
		 		 ?.q2_attr8_concept_task ?.q2_attr9_concept_task =  `""{bf:Political}" "{bf:costs}""' /// 
		 , labsize(vsmall) angle(rvertical)) /// 
		  yline(21 32 38, lstyle(p20) lpattern(dash))   yscale(alt axis(2)) /// 
		  headings( ///
            1.q2_attr1_concept_task = "{it:Ukrainian military casualties}" /// 
			1.q2_attr2_concept_task = "{it:Russian military casualties}" /// /// 
			1.q2_attr3_concept_task = "{it:Ukrainian civilian casualties}" /// /// 
			1.q2_attr4_concept_task = "{it:Ukrainian infrastructure loss}" /// /// 
			1.q2_attr5_concept_task = "{it:[Country] military aid}" /// /// 
			1.q2_attr6_concept_task = "{it:[Country] economic aid}" /// 
			1.q2_attr7_concept_task = "{it:Nuclear strike risk}"                /// 
			1.q2_attr8_concept_task = "{it:Concessions}"                /// 
			1.q2_attr9_concept_task = "{it:Sovereignty}"                /// 
			) /// 
			coeflabels(,labsize(vsmall)) ///
	 msize(small) xlab(, labs(vsmall)) 	 legend(row(1) symysize(vsmall) size(vsmall) order(2 "Strong pro-Western attitudes (Quartile 1)" 4 "Strong anti-Western attitudes (Quartile 4)" )) 
	 
	  graph export "$fig\Fig4.eps", replace 
	  
 ** corresponding Supplementary Information Table 11 
 	  
 
label values q2_attr4_concept_task attr4v2 
label values q2_attr5_concept_task attr5v2
label values q2_attr6_concept_task attr6v2
label values q2_attr7_concept_task attr7v2
label values q2_attr8_concept_task attr8v2

esttab strong_anti_west strong_pro_west   using "$tab\atfig4.tex" /// 
,  replace label cells(b(fmt(4)) p(fmt(4) par) ci(fmt(4) par))	stats(N) mtitles("Strong anti-Western attitudes" "Strong pro-Western attitudes") refcat( ///
            1.q2_attr1_concept_task   "\textit{Ukrainian military casualties}" /// 
					1.q2_attr2_concept_task  "\textit{Russian military casualties}" /// /// 
			1.q2_attr3_concept_task  "\textit{Ukrainian civilian casualties}" /// /// 
			1.q2_attr4_concept_task  "\textit{Ukrainian infrastructure loss}" /// /// 
			1.q2_attr5_concept_task  "\textit{[Country] military aid}" /// /// 
			1.q2_attr6_concept_task  "\textit{[Country] economic aid}" /// 
			1.q2_attr7_concept_task  "\textit{Nuclear strike risk}"                /// 
			1.q2_attr8_concept_task  "\textit{Concessions}"                /// 
			1.q2_attr9_concept_task  "\textit{Sovereignty}"                /// 
			, nolab)  

	
** corresponding Supplementary Information Table 12 with Bonferroni-adjusted CIs

reg choice (ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task)##i.prowestern  [pweight=W8] if antiwestern == 1 | prowestern == 1, cluster(id)

eststo bonf: margins  (ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task)#i.prowestern  ,  post   mcompare(bonferroni) 

matrix conf = r(table)

*store bonferroni CIs
mat conf = r(table)
mat ul = conf[6,1...]
estadd matrix ul = ul : bonf
mat ll = conf[5,1...]
estadd matrix ll = ll : bonf

esttab bonf using "$tab\atfig4bonf.tex" /// 
,  replace label   ///  	
cells("b(fmt(%12.4f)) ll(fmt(%12.4f)) ul(fmt(%12.4f)) p(fmt(%12.4f))") ///
stats(N)  nomtitles   refcat( ///
            1.q2_attr1_concept_task#0.prowestern   "\textit{Ukrainian military casualties}" /// 
					1.q2_attr2_concept_task#0.prowestern  "\textit{Russian military casualties}" /// /// 
			1.q2_attr3_concept_task#0.prowestern  "\textit{Ukrainian civilian casualties}" /// /// 
			1.q2_attr4_concept_task#0.prowestern  "\textit{Ukrainian infrastructure loss}" /// /// 
			1.q2_attr5_concept_task#0.prowestern  "\textit{[Country] military aid}" /// /// 
			1.q2_attr6_concept_task#0.prowestern  "\textit{[Country] economic aid}" /// 
			1.q2_attr7_concept_task#0.prowestern  "\textit{Nuclear strike risk}"                /// 
			1.q2_attr8_concept_task#0.prowestern  "\textit{Concessions}"                /// 
			1.q2_attr9_concept_task#0.prowestern  "\textit{Sovereignty}"                /// 
			, nolab)  

label values q2_attr4_concept_task attr4 
label values q2_attr5_concept_task attr5
label values q2_attr6_concept_task attr6
label values q2_attr7_concept_task attr7
label values q2_attr8_concept_task attr8	

** corresponding Supplementary Information Table 13 with comparison of group differences from strong pro-/anti-Western subgroup marginal means with bonferroni adjustment for paper interpretation
reg choice (ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task)##i.prowestern  [pweight=W8] if antiwestern == 1 | prowestern == 1, cluster(id) 

collect: margins  (ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task)#i.prowestern  , pwcompare(group) mcompare(bonferroni)

 
* associate each groups# result with its predictive margin
local stripe : colname r(table)
local k : list sizeof stripe
forval i = 1/`k' {
    gettoken name stripe : stripe
    collect addtag colname[`name'], fortags(result[groups`i'])
    local glist `glist' groups`i'
}
* put all the groups# results in a composite result so we can
* arrange them in a single column
collect composite define groups = `glist'

* label the groups
collect label levels result groups "Bonferroni groups", modify

* turn off the factor variable binder
collect style row stack, nobinder

* arrange the results of interest
collect layout (colname) (result[_r_b _r_se groups])

* export to LaTeX
collect export $tab\atfig4bonfgroup.tex, replace tableonly


***************************************************************************************************   
******** Figure 5: conceptual, no replication code
***************************************************************************************************

***************************************************************************************************
******** Figure 6: see vignette code 
***************************************************************************************************

***************************************************************************************************
******** Figure 7: see vignette code 
***************************************************************************************************

***************************************************************************************************
******** Figure 8: see vignette code 
***************************************************************************************************


*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
* SUPPLEMENTARY INFORMATION FIGURES
*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


***************************************************************************************************
*** Suppl. Figure 4: 
***************************************************************************************************

eststo clear

eststo basline_model: reg choice ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr8_concept_task ib1.q2_attr9_concept_task  [pweight=W8], cluster(id)

eststo attribute_level_interaction: reg choice ib1.q2_attr5_concept_task##ib1.q2_attr6_concept_task ib1.q2_attr8_concept_task##ib1.q2_attr9_concept_task  [pweight=W8], cluster(id)

eststo metric_interaction: reg choice c.q2_attr5_concept_task_v2##c.q2_attr6_concept_task_v2 c.q2_attr8_concept_task_v2##c.q2_attr9_concept_task_v2  [pweight=W8], cluster(id)

eststo linear_combination: reg choice  ib1.econ ib1.ukr_sov  [pweight=W8], cluster(id)

coefplot basline_model attribute_level_interaction metric_interaction linear_combination, baselevel drop(_cons) /// 
order( /// 
1.q2_attr5_concept_task 2.q2_attr5_concept_task 3.q2_attr5_concept_task q2_attr5_concept_task_v2 /// 
1.q2_attr6_concept_task 2.q2_attr6_concept_task 3.q2_attr6_concept_task q2_attr6_concept_task_v2 /// 
*.q2_attr5_concept_task#*.q2_attr6_concept_task *q2_attr5_concept_task_v2#*q2_attr6_concept_task_v2 *econ /// 
1.q2_attr8_concept_task 2.q2_attr8_concept_task 3.q2_attr8_concept_task 4.q2_attr8_concept_task q2_attr8_concept_task_v2 /// 
1.q2_attr9_concept_task 2.q2_attr9_concept_task 3.q2_attr9_concept_task q2_attr9_concept_task_v2 /// 
*.q2_attr8_concept_task#*.q2_attr9_concept_task *q2_attr8_concept_task_v2#*q2_attr9_concept_task_v2 *ukr_sov) /// 
 xsize(24) ysize(14)  ylab(, labs(vsmall)) xlab(-0.25(0.05)0.05, labs(vsmall)) xline(0) /// 
groups(?.q2_attr5_concept_task* ?.q2_attr6_concept_task* *econ = `""{bf:Support}" "{bf:costs}""' ///
		 		 ?.q2_attr8_concept_task* ?.q2_attr9_concept_task* *ukr_sov =  `""{bf:Political}" "{bf:costs}""' /// 
		 , labsize(vsmall) angle(rvertical)) /// 
		  yline(26, lstyle(p20) lpattern(dash))   yscale(alt axis(2)) /// 
		  headings( ///
			1.q2_attr5_concept_task = "{it:[Country] military aid}" /// /// 
			1.q2_attr6_concept_task = "{it:[Country] economic aid}" /// 
			1.q2_attr5_concept_task#1.q2_attr6_concept_task  = "{it:Interaction/combination [country] military X economic aid}" /// 
			1.q2_attr8_concept_task = "{it:Concessions}"                /// 
			1.q2_attr9_concept_task = "{it:Sovereignty}"                /// 
			1.q2_attr8_concept_task#1.q2_attr9_concept_task  = "{it:Interaction/combination concessions X sovereignty}" /// 
			) ///
			coeflabels(,labsize(vsmall)) /// 
			legend(row(1) symysize(vsmall) size(vsmall) order(2 "Baseline (model 1)" 4 "Attribute level interaction (model 2)" 6 "Metric interaction (model 3)" 8 "Linear attribute combination (model 4)") span) msize(small)



 graph export "$fig\SupplFig4.eps", replace   
 
 
 *** additional calculations for willingness to pay  
 
di -.2188792/.0510872 * 0.6

** additional calculations for elasticity to casualties
di -.0805285/50000 * 10000 
di -.0961299/16000 * 10000

***************************************************************************************************
***** Suppl. Figure 5 : mms by pro anti west for all quartiles 
***************************************************************************************************

eststo clear

reg choice  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  if antiwestern == 1   [pweight=W8], cluster(id)

eststo strong_anti_west: margins  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  , post

reg choice  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  if  slight_antiwestern ==  1 

eststo anti_west: margins  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  , post

reg choice  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  if slight_prowestern == 1 [pweight=W8], cluster(id)

eststo pro_west: margins  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  , post

reg choice  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  if prowestern == 1 [pweight=W8] , cluster(id)

eststo strong_pro_west: margins  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  , post

coefplot strong_anti_west anti_west pro_west strong_pro_west, baselevel drop(_cons) xline(0) ysize(22) xsize(18) /// 
groups(?.q2_attr1_concept_task ?.q2_attr2_concept_task ?.q2_attr3_concept_task ?.q2_attr4_concept_task = `""{bf:Human suffering /}" "{bf:destruction}""' ///
		 ?.q2_attr5_concept_task ?.q2_attr6_concept_task = `""{bf:Support}" "{bf:costs}""' ///
		 ?.q2_attr7_concept_task =  `""{bf:Strategic}" "{bf:risk}""' /// 
		 		 ?.q2_attr8_concept_task ?.q2_attr9_concept_task =  `""{bf:Political}" "{bf:costs}""' /// 
		 , labsize(vsmall) angle(rvertical)) /// 
		  yline(21 32 38, lstyle(p20) lpattern(dash))   yscale(alt axis(2)) /// 
		  headings( ///
            1.q2_attr1_concept_task = "{it:Ukrain. military casualties}" /// 
			1.q2_attr2_concept_task = "{it:Russ. military casualties}" /// /// 
			1.q2_attr3_concept_task = "{it:Ukrain. civilian casualties}" /// /// 
			1.q2_attr4_concept_task = "{it:Ukrain. infrastructure loss}" /// /// 
			1.q2_attr5_concept_task = "{it:[Country] military aid}" /// /// 
			1.q2_attr6_concept_task = "{it:[Country] economic aid}" /// 
			1.q2_attr7_concept_task = "{it:Nuclear strike risk}"                /// 
			1.q2_attr8_concept_task = "{it:Concessions}"                /// 
			1.q2_attr9_concept_task = "{it:Sovereignty}"                /// 
			) /// 
			coeflabels(,labsize(vsmall)) ///
	 msize(small) xlab(, labs(vsmall)) 	 legend(row(2) symysize(vsmall) size(vsmall) order(2 "Strong pro-West. att. (Qu. 1)" 4 "Pro-West. att. (Quartile 2)" 6 "Anti-West. att. (Quartile 3)" 8 "Strong anti-West. att. (Quartile 4)" )) 
	 
	  graph export "$fig\SupplFig5.eps", replace 
   
***************************************************************************************************
*** Supplementary Figure 6 : see vignette code 
***************************************************************************************************



***************************************************************************************************
*** Supplementary Table 4 : see vignette code 
***************************************************************************************************


*************************************************************************************************** 
*** Supplementary Figure 7 : MMs for choice task for pacifistic and hawkish respondents
***************************************************************************************************	
eststo clear  

reg choice  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  if pacifistic == 1 & no_hawkish == 1  [pweight=W8], cluster(id)

eststo pacifist: margins  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  , post  

reg choice  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  if no_pacifistic == 1 & hawkish == 1  [pweight=W8], cluster(id)

eststo hawk: margins  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  , post

reg choice  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  if !((pacifistic==1 & no_hawkish==1)) & !((hawkish==1 & no_pacifistic==1)) & pacifistic<. & hawkish<. & no_pacifistic<. & no_hawkish<. [pweight=W8], cluster(id)

eststo intermediate: margins  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  , post

		coefplot pacifist intermediate hawk,  baselevel drop(_cons) xline(0.5) ysize(16) xsize(20) ///  
groups(?.q2_attr1_concept_task ?.q2_attr2_concept_task ?.q2_attr3_concept_task ?.q2_attr4_concept_task = `""{bf:Human suffering /}" "{bf:destruction}""' ///
		 ?.q2_attr5_concept_task ?.q2_attr6_concept_task = `""{bf:Support}" "{bf:costs}""' ///
		 ?.q2_attr7_concept_task =  `""{bf:Strategic}" "{bf:risk}""' /// 
		 		 ?.q2_attr8_concept_task ?.q2_attr9_concept_task =  `""{bf:Political}" "{bf:costs}""' /// 
		 , labsize(vsmall) angle(rvertical)) /// 
		  yline(21 32 38, lstyle(p20) lpattern(dash))   yscale(alt axis(2)) /// 
		  headings( ///
            1.q2_attr1_concept_task = "{it:Ukrainian military casualties}" /// 
			1.q2_attr2_concept_task = "{it:Russian military casualties}" ///   
			1.q2_attr3_concept_task = "{it:Ukrainian civilian casualties}" ///   
			1.q2_attr4_concept_task = "{it:Ukrainian infrastructure loss}" ///   
			1.q2_attr5_concept_task = "{it:[Country] military aid}" ///   
			1.q2_attr6_concept_task = "{it:[Country] economic aid}" /// 
			1.q2_attr7_concept_task = "{it:Nuclear strike risk}"                /// 
			1.q2_attr8_concept_task = "{it:Concessions}"                /// 
			1.q2_attr9_concept_task = "{it:Sovereignty}"                /// 
			) /// 
			coeflabels(,labsize(vsmall)) ///
	 msize(small) xlab(, labs(vsmall)) 	 legend(row(1) symysize(vsmall) size(vsmall) ) ///
	 xlabel(0.4(0.05)0.6)
	 
	 
	  graph export "$fig\SupplFig7.eps", replace  

***************************************************************************************************
*** Supplementary Figure 8 : see vignette code 
***************************************************************************************************

***************************************************************************************************
*** Supplementary Figure 9 : see vignette code 
***************************************************************************************************

***************************************************************************************************
*** Supplementary Figure 10 : see vignette code 
***************************************************************************************************

***************************************************************************************************
*** Supplementary Figure 11 : MMs for choice task by bottom/top quartile of first two components of the attitudes towards war and peace item battery 
***************************************************************************************************


eststo clear

reg choice  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  if pacifistic == 1   [pweight=W8], cluster(id)

eststo pacifist: margins  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  , post

reg choice  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  if no_pacifistic == 1   [pweight=W8], cluster(id)

eststo no_pacifist: margins  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  , post

reg choice  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  if hawkish == 1  [pweight=W8], cluster(id)

eststo hawk: margins  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  , post

reg choice  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  if no_hawkish == 1  [pweight=W8], cluster(id)

eststo no_hawk: margins  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  , post


coefplot pacifist no_pacifist, bylabel("Attitudes towards peace [very" "pacifist vs. not] (war/peace dim. 1)") || hawk no_hawk, bylabel("Attitudes towards war [very" "bellecistic vs. not] (war/peace dim. 2)")  byopts(compact cols(2) ) subtitle(, size(small)) baselevel drop(_cons) xline(0.5) ysize(16) xsize(20) ///  
groups(?.q2_attr1_concept_task ?.q2_attr2_concept_task ?.q2_attr3_concept_task ?.q2_attr4_concept_task = `""{bf:Human suffering /}" "{bf:destruction}""' ///
		 ?.q2_attr5_concept_task ?.q2_attr6_concept_task = `""{bf:Support}" "{bf:costs}""' ///
		 ?.q2_attr7_concept_task =  `""{bf:Strategic}" "{bf:risk}""' /// 
		 		 ?.q2_attr8_concept_task ?.q2_attr9_concept_task =  `""{bf:Political}" "{bf:costs}""' /// 
		 , labsize(vsmall) angle(rvertical)) /// 
		  yline(21 32 38, lstyle(p20) lpattern(dash))   yscale(alt axis(2)) /// 
		  headings( ///
            1.q2_attr1_concept_task = "{it:Ukrainian military casualties}" /// 
			1.q2_attr2_concept_task = "{it:Russian military casualties}" ///   
			1.q2_attr3_concept_task = "{it:Ukrainian civilian casualties}" ///   
			1.q2_attr4_concept_task = "{it:Ukrainian infrastructure loss}" ///   
			1.q2_attr5_concept_task = "{it:[Country] military aid}" ///   
			1.q2_attr6_concept_task = "{it:[Country] economic aid}" /// 
			1.q2_attr7_concept_task = "{it:Nuclear strike risk}"                /// 
			1.q2_attr8_concept_task = "{it:Concessions}"                /// 
			1.q2_attr9_concept_task = "{it:Sovereignty}"                /// 
			) /// 
			coeflabels(,labsize(vsmall)) ///
	 msize(small) xlab(, labs(vsmall)) 	 legend(row(1) symysize(vsmall) size(vsmall) order(2 "25% highest score" 4 "25% lowest score")) ///
	 xlabel(0.4(0.05)0.6)

 graph export "$fig\SupplFig11.eps", replace  
	 	  


***************************************************************************************************
*** Supplementary Figure 12 : MMs for choice task by foreign policy values
***************************************************************************************************

eststo clear

reg choice  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  if isolationist == 1   [pweight=W8], cluster(id)

eststo isolationist: margins  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  , post

reg choice  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  if no_isolationist == 1   [pweight=W8], cluster(id)

eststo no_isolationist: margins  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  , post

reg choice  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  if interventionist == 1  [pweight=W8], cluster(id)

eststo mil_internationalist: margins  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  , post

reg choice  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  if no_interventionist == 1  [pweight=W8], cluster(id)

eststo no_mil_internationalist: margins  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  , post

reg choice  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  if cooperator == 1  [pweight=W8], cluster(id)

eststo coop_internationalist: margins  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  , post

reg choice  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  if no_cooperator == 1  [pweight=W8], cluster(id)

eststo no_coop_internationalist: margins  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task  , post


coefplot  coop_internationalist no_coop_internationalist, bylabel(Cooperative internat. val.) || mil_internationalist no_mil_internationalist, bylabel(Militant internat. values) || isolationist no_isolationist, bylabel(Isolationist values)  byopts(compact cols(3)) subtitle(, size(small)) baselevel drop(_cons) xline(0.5) ysize(16) xsize(20) ///  
groups(?.q2_attr1_concept_task ?.q2_attr2_concept_task ?.q2_attr3_concept_task ?.q2_attr4_concept_task = `""{bf:Human suffering /}" "{bf:destruction}""' ///
		 ?.q2_attr5_concept_task ?.q2_attr6_concept_task = `""{bf:Support}" "{bf:costs}""' ///
		 ?.q2_attr7_concept_task =  `""{bf:Strategic}" "{bf:risk}""' /// 
		 		 ?.q2_attr8_concept_task ?.q2_attr9_concept_task =  `""{bf:Political}" "{bf:costs}""' /// 
		 , labsize(vsmall) angle(rvertical)) /// 
		  yline(21 32 38, lstyle(p20) lpattern(dash))   yscale(alt axis(2)) /// 
		  headings( ///
            1.q2_attr1_concept_task = "{it:Ukrainian military casualties}" /// 
			1.q2_attr2_concept_task = "{it:Russian military casualties}" ///   
			1.q2_attr3_concept_task = "{it:Ukrainian civilian casualties}" ///   
			1.q2_attr4_concept_task = "{it:Ukrainian infrastructure loss}" ///   
			1.q2_attr5_concept_task = "{it:[Country] military aid}" ///   
			1.q2_attr6_concept_task = "{it:[Country] economic aid}" /// 
			1.q2_attr7_concept_task = "{it:Nuclear strike risk}"                /// 
			1.q2_attr8_concept_task = "{it:Concessions}"                /// 
			1.q2_attr9_concept_task = "{it:Sovereignty}"                /// 
			) /// 
			coeflabels(,labsize(vsmall)) ///
	 msize(small) xlab(, labs(vsmall)) 	 legend(row(1) symysize(vsmall) size(vsmall) order(2 "25% highest score" 4 "25% lowest score")) ///
	 xlabel(0.4(0.05)0.6)

 graph export "$fig\SupplFig12.eps", replace  


***************************************************************************************************
*** Supplementary Figure 13: AMCEs for the conjoint choice task by task order (task 1: presented first; to task 4: presented last)
***************************************************************************************************

eststo clear

eststo task_1: reg choice  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task if task_no == 1 [pweight=W8], cluster(id)

eststo task_2: reg choice  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task if task_no == 2 [pweight=W8], cluster(id)

eststo task_3: reg choice  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task if task_no == 3 [pweight=W8], cluster(id)

eststo task_4: reg choice  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task if task_no == 4 [pweight=W8], cluster(id)

coefplot task_1 task_2 task_3 task_4, baselevel drop(_cons) xline(0) ysize(16) xsize(20)   yline(21 32 38, lstyle(p20) lpattern(dash)) yscale(alt axis(2)) /// 
groups(?.q2_attr1_concept_task ?.q2_attr2_concept_task ?.q2_attr3_concept_task ?.q2_attr4_concept_task = `""{bf:Human suffering /}" "{bf:destruction}""' ///
		 ?.q2_attr5_concept_task ?.q2_attr6_concept_task = `""{bf:Support}" "{bf:costs}""' ///
		 ?.q2_attr7_concept_task =  `""{bf:Strategic}" "{bf:risk}""' /// 
		 		 ?.q2_attr8_concept_task ?.q2_attr9_concept_task =  `""{bf:Political}" "{bf:costs}""' /// 
		 , labsize(vsmall)  angle(rvertical)) /// 
		  headings( ///
            1.q2_attr1_concept_task = "{it:Ukrainian military casualties}" /// 
			1.q2_attr2_concept_task = "{it:Russian military casualties}" /// /// 
			1.q2_attr3_concept_task = "{it:Ukrainian civilian casualties}" /// /// 
			1.q2_attr4_concept_task = "{it:Ukrainian infrastructure loss}" /// /// 
			1.q2_attr5_concept_task = "{it:[Country] military aid}" /// /// 
			1.q2_attr6_concept_task = "{it:[Country] economic aid}" /// 
			1.q2_attr7_concept_task = "{it:Nuclear strike risk}"                /// 
			1.q2_attr8_concept_task = "{it:Concessions}"                /// 
			1.q2_attr9_concept_task = "{it:Sovereignty}"                /// 
			) /// 
			coeflabels(,labsize(vsmall) ) ///
	 msize(small) xlab(, labs(vsmall)) ///
	 	 legend(row(1) symysize(vsmall) size(vsmall) order(2 "Task 1" 4 "Task 2" 6 "Task 3" 8 "Task 4"))  

  
 graph export "$fig\SupplFig13.eps", replace   
 
 
 *sign differences?
reg choice  (ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task)##i.task_no [pweight=W8], cluster(id)

margins  (ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task)#i.task_no ,  pwcompare(groups) mcompare(bonferroni)

	  
***************************************************************************************************
*** Supplementary Figure 14: AMCEs for the conjoint choice task by profile order (profile A: presented on left side; profile B: presented on right side)
***************************************************************************************************


eststo clear

eststo profile_A: reg choice  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task if concept == 1 [pweight=W8], cluster(id)

eststo profile_B: reg choice  ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task if concept == 2 [pweight=W8], cluster(id)

coefplot profile_A profile_B, baselevel drop(_cons) xline(0) ysize(16) xsize(20)   yline(21 32 38, lstyle(p20) lpattern(dash)) yscale(alt axis(2)) /// 
groups(?.q2_attr1_concept_task ?.q2_attr2_concept_task ?.q2_attr3_concept_task ?.q2_attr4_concept_task = `""{bf:Human suffering /}" "{bf:destruction}""' ///
		 ?.q2_attr5_concept_task ?.q2_attr6_concept_task = `""{bf:Support}" "{bf:costs}""' ///
		 ?.q2_attr7_concept_task =  `""{bf:Strategic}" "{bf:risk}""' /// 
		 		 ?.q2_attr8_concept_task ?.q2_attr9_concept_task =  `""{bf:Political}" "{bf:costs}""' /// 
		 , labsize(vsmall)  angle(rvertical)) /// 
		  headings( ///
            1.q2_attr1_concept_task = "{it:Ukrainian military casualties}" /// 
			1.q2_attr2_concept_task = "{it:Russian military casualties}" /// /// 
			1.q2_attr3_concept_task = "{it:Ukrainian civilian casualties}" /// /// 
			1.q2_attr4_concept_task = "{it:Ukrainian infrastructure loss}" /// /// 
			1.q2_attr5_concept_task = "{it:[Country] military aid}" /// /// 
			1.q2_attr6_concept_task = "{it:[Country] economic aid}" /// 
			1.q2_attr7_concept_task = "{it:Nuclear strike risk}"                /// 
			1.q2_attr8_concept_task = "{it:Concessions}"                /// 
			1.q2_attr9_concept_task = "{it:Sovereignty}"                /// 
			) /// 
			coeflabels(,labsize(vsmall) ) ///
	 msize(small) xlab(, labs(vsmall)) ///
	 	 legend(row(1) symysize(vsmall) size(vsmall) order(2 "Profile A" 4 "Profile B"))  

  
 graph export "$fig\SupplFig14.eps", replace   
 
 reg choice  (ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task)##i.concept [pweight=W8], cluster(id)

margins  (ib1.q2_attr1_concept_task ib1.q2_attr2_concept_task ib1.q2_attr3_concept_task ib1.q2_attr4_concept_task ib1.q2_attr5_concept_task  ib1.q2_attr6_concept_task ib1.q2_attr7_concept_task ib1.q2_attr8_concept_task  ib1.q2_attr9_concept_task)#i.concept ,  pwcompare(groups) mcompare(bonferroni)


***************************************************************************************************
*** Supplementary Figures 15-17: See R script
***************************************************************************************************

***************************************************************************************************
*** Supplementary Tables 5-6: See R script
***************************************************************************************************

***************************************************************************************************
*** Supplementary Tables 7-13: These present statistics directly related to the main figures 2, 3, 4, and respective code is presented above with the figure code
***************************************************************************************************

***************************************************************************************************
*** Supplementary Tables 14-17: See vignette code
***************************************************************************************************

***************************************************************************************************
*** Supplementary Tables 18-19: See R script
***************************************************************************************************


*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*END 
*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


